package com.h2210c.user.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.h2210c.user.mapper.MemberMapper;
import com.h2210c.user.mapper.PaperMapper;
import com.h2210c.user.service.MemberService;
import com.h2210c.user.service.PaperService;
import com.jiyun.model.Member;
import com.jiyun.model.Paper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaperServiceimpl extends ServiceImpl<PaperMapper, Paper> implements PaperService {
    @Autowired
    PaperMapper paperMapper;

    @Override
    public PageInfo<Paper> findPage(Paper paper) {
        PageHelper.startPage(paper.getPage(),paper.getPageSize());
        List<Paper> papers = paperMapper.selectList(null);
        PageInfo<Paper> paperPageInfo = new PageInfo<>(papers);
        return paperPageInfo;

    }
}
